import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        userName: "A",
        cont: 0,
    },
    mutations: {
        userName(state, msg) {
            state.userName = msg;
        },
        addcont(state, num) {
            state.cont = cont + num;
        },
    },
    getters: {
        getcont(state) {
            return state.cont;
        },
        getUserName(state) {
            return state.userName;
        }
    },
    actions: {},
    modules: {}
})
